Transaction Support
NOTE: The .NET Client attaches the provider-specific prefix "SequeLink" to the names of the public objects, for example, SequeLinkConnection or SequeLinkCommand.
The .NET Client supports both local and distributed transactions.
Using Local Transactions
The .NET Client uses 100% managed code in supporting local transactions. Local transactions are implemented within the .NET Framework and use the internal transaction manager of the underlying database.
The .NET Client supports savepoints through the Save() and Rollback(String) methods of the SequeLinkTransaction object.
If your application connects to only one database and you have no requirement to connect to another database, you should use local transactions. Local transactions are always faster than distributed transactions, which require additional logging and network I/O. In addition, local transactions provide the added benefit of increased security because the data provider does not need to call unmanaged code.
Using Distributed Transactions
The .NET Client supports distributed transactions through the Microsoft Distributed Transaction Coordinator (MS DTC). The MS DTC is provided through COM+ Services. These components are required to call some unmanaged code, which can affect the level of security available. If maintaining 100% managed code is important in your environment, do not use distributed transactions.
The .NET Client supports distributed transactions only when the following conditions are met:
Applications that do not enlist in MS DTC coordinated transactions use only managed code, even if the MS DTC components are installed. Unmanaged code is called only if the application performs distributed transaction processing.
To use distributed transactions, you must include specific code in the namespace of your application, as shown in the following code fragment:
Distributed transactions are significantly slower than normal transactions due to the logging and network I/O necessary to communicate between all the components involved in the distributed transaction.
Because the .NET data provider is a managed data provider, you can still enjoy some of the benefits of the .NET Framework security when you use distributed transactions. The security afforded by the data provider, with the security defined in the underlying database, provides good protection when you use distributed transactions.